package com.et.easy.demo.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * 演示spring依赖注入
 * 
 * @author defier Lai Date: 2009-12-9 下午11:28:47
 * @version 1.0
 */
public class SpringMain {

	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml");
		UserService service = (UserService) ctx.getBean("userService");
		service.findUserInfo(199);
		service.saveUser();

		WebController wc = (WebController) ctx.getBean("webController");
		wc.list();
	}

}
